home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11619 < prev    next >
Encoding:
Text File  |  2002-07-05  |  3.0 KB  |  147 lines

  1. <HTML>
  2. <HEAD>
  3.   <LINK REL="stylesheet" TYPE="text/css" HREF="%1css/default.css">
  4. </HEAD>
  5.  
  6.  
  7. <SCRIPT language="JavaScript">
  8.  
  9. var numOfServers = %2;
  10.  
  11. function logonInfo(id, serverName, userName, password)
  12. {
  13.     this.id = id;
  14.     this.serverName = serverName;
  15.     this.userName = userName;
  16.     this.password = password;
  17. }
  18.  
  19. var logonInfoArray = new Array();
  20.  
  21. %3
  22.  
  23. function changeMachine()
  24. {
  25.    list = document.svrLogon.svrName;
  26.    if (list.selectedIndex >= 0) {
  27.      info = logonInfoArray[list.selectedIndex];
  28.      userName = info.userName;
  29.      password = info.password;
  30.  
  31.      document.svrLogon.USR.value = userName;
  32.      document.svrLogon.PWD.value = password;
  33.   }
  34. }
  35.  
  36. function changeLogonName()
  37. {
  38.    list = document.svrLogon.svrName;
  39.    if (list.selectedIndex >= 0) {
  40.      var info = logonInfoArray[list.selectedIndex];
  41.      info.userName = document.svrLogon.USR.value;
  42.    }
  43. }
  44.  
  45. function changePassword()
  46. {
  47.    list = document.svrLogon.svrName;
  48.    if (list.selectedIndex >= 0){
  49.      info = logonInfoArray[list.selectedIndex];
  50.      info.password = document.svrLogon.PWD.value;
  51.    }
  52. }
  53.  
  54.  
  55. function onOK()
  56. {
  57.    if (numOfServers != 0)
  58.    {
  59.         // record the last change first
  60.         list = document.svrLogon.svrName;
  61.         info = logonInfoArray[list.selectedIndex];
  62.         if (list.selectedIndex >= 0) {
  63.             info.userName = document.svrLogon.USR.value;
  64.             info.password = document.svrLogon.PWD.value;
  65.         }
  66.  
  67.         for (var i = 0; i < numOfServers; i++)
  68.         {
  69.             var info = logonInfoArray[i];
  70.         
  71.             document.svrLogon.elements["svrid"+i].value = info.id;
  72.             document.svrLogon.elements["usr"+i].value = info.userName;
  73.             document.svrLogon.elements["pwd"+i].value = info.password;
  74.         }
  75.  
  76.         document.forms['svrLogon'].submit();
  77.    }
  78.    else
  79.       OnCancel();
  80.    
  81. }
  82.  
  83. function OnCancel()
  84. {
  85.    var url = "%5";
  86.    document.location = url;
  87. }
  88.  
  89. function onInit()
  90. {
  91.     if (numOfServers != 0)
  92.     {
  93.        // Change the single string sitting in "servers" to a set of strings 
  94.        document.svrLogon.svrName.options[0] = null; 
  95.     
  96.        for (i = 0; i < numOfServers; ++i)
  97.        {
  98.             option = new Option(logonInfoArray[i].serverName, logonInfoArray[i].serverName, false, false); 
  99.             document.svrLogon.svrName.options[document.svrLogon.svrName.options.length] = option; 
  100.        }
  101.  
  102.        document.svrLogon.svrName.options[0].selected = true;
  103.     }
  104. }
  105.  
  106. </SCRIPT>
  107.  
  108. <BODY onLoad="onInit()" MARGINWIDTH="100">
  109. <FORM  name="svrLogon" method="post" action="%4">
  110.  
  111. <center>
  112. <TABLE width="80%" cellspacing="0" border="0">
  113.   %6
  114.   <tr>
  115.     <td class="list" height=30> </td>
  116.   </tr>
  117.   %7
  118.  
  119.   <tr>
  120.     <td class="list" height=80> </td>
  121.   </td>
  122.   <TR>
  123.     <td>
  124.       <table cellpadding=0 border=0>
  125.         <tr>
  126.             <td width=200>  </td>
  127.             <td class="clsButton" align=middle nowrap>
  128.             <div class="clsButton"><a href="javascript:onOK();" >OK</a></div>
  129.             </td>
  130.  
  131.             %8
  132.         </tr>
  133.       </table>
  134.     </td>
  135.   </TR>
  136. </TABLE>
  137.  
  138. </center>
  139.  
  140. %9
  141.  
  142. </FORM>
  143.  
  144.  
  145. </BODY>
  146. </HTML>
  147.